
import Toast from './toast.vue'

function create() {

}


export default {
    install(Vue) {
        Vue.prototype.$toast = (content: string = "", type: string = "") => {
            // console.log(content, type);
            let ctrl=Vue.extend({
                data() {
                    return {
                        render: null
                    }
                },
                render(h) {
                    return this.render ? this.render(h) : null
                },
                methods: {
                    open(h) {
                        ctrl.render= h;
                        // console.log(ctrl.render);
                    },
                    close() {

                    }
                },
            });

            new ctrl().open(211);
        }
    }
}